<can-import>

  • module
can/view/stache/system.import  

<can-import from="MODULE_NAME"/>

Parameters

  1. MODULE_NAME {moduleName}Optional

    A module that this template depends on.

Use

A template might depend on component or helper modules. <can-import> allows you to specify these dependencies.

Example:

<can-import from="components/my_tabs"/>
<can-import from="helpers/prettyDate"/>

<my-tabs>
  <my-panel title="{{prettyDate start}}">...</my-panel>
  <my-panel title="{{prettyDate end}}">...</my-panel>
</my-tabs>

Currently this only works with can.autorender or the system plugin.